<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <p v-text>{{msg}}</p>

        <h1>{{msg1+"hello"+"world"}}</h1>
         <!--  -->
        <p>{{arr[1]+arr[0]}}</p>
       <!-- true 唱得好 false 不好 -->
        <h3>{{bool?"唱得好":"不好"}}</h3>
        <!-- 截取 -->
        <p>{{str.slice(0,4)}}</p>

        <p>{{str.indexOf("中国")}}</p>



    </div>

    <div class="box">{{msg}}</div>
    <script>
        new Vue({
            el:"#app",
            data:{
                msg:"嘻嘻嘻",
                msg1:"hello world",
                arr:["一把火","冬天里的"],
                bool:false,
                str:"我爱吃饭吃青菜"
            }
        }),


        new Vue({
            el:".box",
            data:{
                msg:"你好"
            }
        })
        
        
    </script>
    
</body>
</html>